(in-package :TRAPS)
; Generated from #P"macintosh-hd:hd3:CInterface Translator:Source Interfaces:at_pat.h"
; at Sunday July 2,2006 7:26:40 pm.
; 
;  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
;  *
;  * @APPLE_LICENSE_HEADER_START@
;  * 
;  * The contents of this file constitute Original Code as defined in and
;  * are subject to the Apple Public Source License Version 1.1 (the
;  * "License").  You may not use this file except in compliance with the
;  * License.  Please obtain a copy of the License at
;  * http://www.apple.com/publicsource and read it before using this file.
;  * 
;  * This Original Code and all software distributed under the License are
;  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
;  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
;  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
;  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
;  * License for the specific language governing rights and limitations
;  * under the License.
;  * 
;  * @APPLE_LICENSE_HEADER_END@
;  
; 
;  *	Copyright (c) 1988, 1989 Apple Computer, Inc. 
;  
; #ifndef _NETAT_AT_PAT_H_
; #define _NETAT_AT_PAT_H_

(require-interface "sys/appleapiopts")
;  This is header for the PAT module. This contains a table of pointers that 
;  * should get initialized with the BNET stuff and the ethernet driver. The 
;  * number of interfaces supported should be communicated. Should include
;  * mbuf.h, if.h, socket.h
;  *
;  * Author: R. C. Venkatraman
;  * Date  : 2/29/88 
;  
(defrecord enet_header_t   (dst (:array :UInt8 6))
   (src (:array :UInt8 6))
   (len :UInt16)
)
(defrecord llc_header_t
   (dst_sap :UInt8)
   (src_sap :UInt8)
   (control :UInt8)
   (protocol (:array :UInt8 5))
)
(defconstant $ENET_LLC_SIZE 22)
; #define ENET_LLC_SIZE (sizeof(enet_header_t)+sizeof(llc_header_t))
(defconstant $SNAP_UI 3)
; #define SNAP_UI		0x03  /* bits 11000000 reversed!! */
(defconstant $SNAP_AT_SAP 170)
; #define SNAP_AT_SAP	0xaa
; #define SNAP_PROTO_AT	{0x08, 0x00, 0x07, 0x80, 0x9B}
; #define SNAP_PROTO_AARP	{0x00, 0x00, 0x00, 0x80, 0xF3}
; #define SNAP_HDR_AT	{SNAP_AT_SAP, SNAP_AT_SAP, SNAP_UI, SNAP_PROTO_AT}
; #define SNAP_HDR_AARP	{SNAP_AT_SAP, SNAP_AT_SAP, SNAP_UI, SNAP_PROTO_AARP}
; #define LLC_PROTO_EQUAL(a1, a2)                                                 ((*((unsigned long *)(a1)) == *((unsigned long *)(a2))) &&      	 (a1[4] == a2[4])				                	)

; #endif /* _NETAT_AT_PAT_H_ */


(provide-interface "at_pat")